package com.ruoyi.cinema.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cinema.mapper.GoodsCategoryMapper;
import com.ruoyi.cinema.domain.GoodsCategory;
import com.ruoyi.cinema.service.IGoodsCategoryService;

/**
 * 卖品分类Service业务层处理
 *
 * @author HHAOYU
 * @date 2020-12-09
 */
@Service
public class GoodsCategoryServiceImpl extends ServiceImpl<GoodsCategoryMapper, GoodsCategory> implements IGoodsCategoryService  {
    @Autowired
    private GoodsCategoryMapper goodsCategoryMapper;

    /**
     * 查询卖品分类
     *
     * @param id 卖品分类ID
     * @return 卖品分类
     */
    @Override
    public GoodsCategory selectGoodsCategoryById(Long id)
    {
        return goodsCategoryMapper.selectGoodsCategoryById(id);
    }

    /**
     * 查询卖品分类列表
     *
     * @param goodsCategory 卖品分类
     * @return 卖品分类
     */
    @Override
    public List<GoodsCategory> selectGoodsCategoryList(GoodsCategory goodsCategory)
    {
        return goodsCategoryMapper.selectGoodsCategoryList(goodsCategory);
    }

    /**
     * 新增卖品分类
     *
     * @param goodsCategory 卖品分类
     * @return 结果
     */
    @Override
    public int insertGoodsCategory(GoodsCategory goodsCategory)
    {
        return goodsCategoryMapper.insertGoodsCategory(goodsCategory);
    }

    /**
     * 修改卖品分类
     *
     * @param goodsCategory 卖品分类
     * @return 结果
     */
    @Override
    public int updateGoodsCategory(GoodsCategory goodsCategory)
    {
        return goodsCategoryMapper.updateGoodsCategory(goodsCategory);
    }

    /**
     * 批量删除卖品分类
     *
     * @param ids 需要删除的卖品分类ID
     * @return 结果
     */
    @Override
    public int deleteGoodsCategoryByIds(Long[] ids)
    {
        return goodsCategoryMapper.deleteGoodsCategoryByIds(ids);
    }

    /**
     * 删除卖品分类信息
     *
     * @param id 卖品分类ID
     * @return 结果
     */
    @Override
    public int deleteGoodsCategoryById(Long id)
    {
        return goodsCategoryMapper.deleteGoodsCategoryById(id);
    }
}
